<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>展开运算符</title>
</head>

<body>
    <script>
        const arr1 = [1, 2, 3, 4, 5]
        const arr2 = [6, 7, 8, 9]
        // 利用展开运算符合并数组
        const arr3 = [...arr1, ...arr2]
        console.log(arr3);

        // 展开运算符求最大值
        const max = Math.max(...arr3)
        console.log(max);

    </script>
</body>

</html>